package leetcode;

public class TwoSum {
	public int[] twoSum(int[] numbers, int target) {
		if (numbers == null || numbers.length < 2)
			return null;

		for (int i = 0; i < numbers.length - 1; ++i) {
			for (int j = i + 1; j < numbers.length; ++j) {
				if (numbers[i] + numbers[j] == target)
					return new int[] { i + 1, j + 1 };
			}
		}

		return null;
	}
}
